package StudyCode.summary.mycollection;

import java.util.HashMap;
import java.util.Map;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class FindTheWordFrequencyWithMap {
	public static void main(String[] args) {
		Map<String, Integer> m = new HashMap<String, Integer>();

		for (String a : args) {
			Integer freq = m.get(a);
			m.put(a, (freq == null) ? 1 : freq + 1);
		}

		System.out.println(m.size() + " 个不同单词:");
		System.out.println(m);
	}
}
